package me.jollyfly.jshop.content.client.api;

import me.jollyfly.jshop.common.bean.ResultBean;
import me.jollyfly.jshop.content.client.model.ContentDO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author 354649
 */
public interface ContentApi {



    /**
     * 根据内容分类id获取该分类下所有的内容
     *
     * @param catId 内容分类Id
     *
     * @return ResultBean
     *
     * @author jollyfly
     */

    @GetMapping("/service/content/cat/{id}")
    ResultBean<List<ContentDO>> listContentByCat(@PathVariable("id")  Long catId);
    /**
     * 根据内容code获取所有内容
     *
     * @param code 内容编号code
     *
     * @return
     */

    @GetMapping("/service/content/code/{code}")
    ResultBean<List<ContentDO>> listContentByCode(@PathVariable("code")  String code);


    /**
     * 获取轮播图片
     */
    @GetMapping("/service/content/sliders")
    ResultBean<List<ContentDO>> listSliders();

    @GetMapping("/service/content/recommendation")
    ResultBean<List<ContentDO>> listRecommendation();

}